<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.hostmanagement.message.FixMessage"%>
<%@page import="com.hostmanagement.user.UserBean;"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
			
	String messageId = request.getParameter("messageId");		
	FixMessage fixMessage = new FixMessage();
	Map map = fixMessage.detailMessage(new Integer(messageId.trim()));
	
%>
<html>
	<HEAD>

		<title>系统公告</title>
		<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #5CB7FE;
}

.STYLE1 {
	font-size: 12px
}
-->
</style>
		<LINK href="./css/style.css" type=text/css rel=stylesheet>
		<meta http-equiv="Content-Type" content="text/html; charset=" utf-8" />
	</head>
	<body>
	<form id="form" action="">
		<table width="366" border="0" align="center" cellpadding="0"
			cellspacing="0">
			<!--DWLayoutTable-->
			<tr>
				<td width="10" height="3">
				<td width="345"></td>
				<td width="11"></td>
			<tr>
				<td rowspan="3" align="right" valign="bottom">
					<img src="images/icon13.jpg" width="6" height="25" />
				</td>
				<td height="5">

				</td>
				<td rowspan="3" valign="bottom">
					<img src="images/icon10.jpg" width="10" height="25" />
				</td>
			</tr>
			<tr>
				<td height="24" align="center" valign="middle"
					background="images/icon12.jpg">
					<span class="STYLE1">
					</span>
				</td>
			</tr>
			<tr>
				<td height="1"></td>
			</tr>
		</table>
		<table width="364" border="0" align="center" cellpadding="0"
			cellspacing="0">
			<!--DWLayoutTable-->
				
			<%
			UserBean userBean = (UserBean)session.getAttribute("userBean");
			if(userBean.getRuleId() == 1){
			%>
				<tr>
					<td width="364" height="25" align="right" valign="middle">
						<span class="STYLE1">回复意见：<%=map.get("answer") %> </span>
					</td>
				</tr>
				<tr>
					<td width="364" height="25" align="right" valign="middle">
						<span class="STYLE1">回复内容：<%=map.get("answerContent") %> </span>
					</td>
				</tr>
				<tr>
					<td width="364" height="25" align="right" valign="middle">
						<span class="STYLE1">回复时间：<%=map.get("answerTime") %> </span>
					</td>
				</tr>
			<%
			}
			
			else{
			%>
				
				<input type="hidden" id="messageId" name="messageId" value="<%=map.get("messageId") %>"/>
				<tr>
					<td width="364" height="25" align="right" valign="middle">
						<select id="applyAnswer" name="applyAnswer">
							<option value="">请选择</option>
							<option value="不同意">不同意</option>
							<option value="同意">同意</option>
						</select>
					</td>
				</tr>
				<tr>
					<td width="364" height="25" align="right" valign="middle">
						<span class="STYLE1">回复内容：</span>
						<textarea rows="3" cols="20" id="applyContent" name="applyContent"></textarea>
					</td>
				</tr>
				<tr>
					<td width="364" height="25" align="right" valign="middle">
						<input type="submit" name="回复" value="回复" class="btn1_mouseout"
					onMouseOver="this.className='btn1_mouseover'"
					onMouseOut="this.className='btn1_mouseout'"/>
					</td>
				</tr>
				
			<%} %>
			<tr>
				<td width="364" height="25" align="right" valign="middle">
					<span class="STYLE1">发布日期：<%=map.get("sendTime") %> </span>
				</td>
			</tr>
			<tr>
				<td height="114" valign="top">
					<span class="STYLE1">内容: 
					<%=map.get("fixContent") %>
					</span>
				</td>
			</tr>
			<tr>
				<td height="114" valign="top">
					<span class="STYLE1">用料: 
					<%=map.get("useStuff") %>
					</span>
				</td>
			</tr>
			<tr>
				<td height="114" valign="top">
					<span class="STYLE1">估计用时: 
					<%=map.get("fixTime") %>小时
					</span>
				</td>
			</tr>
			<tr>
				<td height="114" valign="top">
					<span class="STYLE1">预算费用: 
					<%=map.get("budgetMoney") %>元
					</span>
				</td>
			</tr>
			
			
			<input type="button" name="Submit" class="btn1_mouseout"
					onMouseOver="this.className='btn1_mouseover'"
					onMouseOut="this.className='btn1_mouseout'"
					onclick="window.close()" value="关闭窗口">
	
		</table>
		</form>
	</body>
</html>